package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Insurance;
import cn.wolfcode.crm.domain.Product;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InsuranceMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Insurance record);

    Insurance selectByPrimaryKey(Long id);

    List<Insurance> selectAll();

    int updateByPrimaryKey(Insurance record);

    int queryForCount(QueryObject qo);

    List<Insurance> queryForList(QueryObject qo);

    void submitAudit(Long id);

    void returnApplication(Long id);

    void passApplication(Insurance insurance);

    Insurance getByIdAndState(@Param("id") Long id, @Param("state") int state);

    Product getProductById(Long id);

    void payInsurance(Insurance insurance);

    Insurance selectBySn(String numbering);
}